/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.qdu.servlet;

import com.qdu.entity.PublicActivity;
import com.qdu.service.impl.PublicActivityServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.qdu.service.PublicActivityService;

/**
 *
 * @author Daniel
 */
@WebServlet("/mpas")
public class ModifyPublicActivitySituationServlet extends HttpServlet {
    PublicActivityService ps = new PublicActivityServiceImpl();
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        
        req.setCharacterEncoding("utf-8");
        
        String Plocal = req.getParameter("Plocal");
        String Pps = req.getParameter("Pps");
        String Ptag = req.getParameter("Ptag");
        String Psit = req.getParameter("Psit");
        int Pno = Integer.parseInt(req.getParameter("Pno"));


        PublicActivity newpublic = new PublicActivity(Pno,Plocal,Pps,Ptag,Psit);
        int rows =  ps.modifyPublicSituation(newpublic);
        
        
        
     
        resp.getWriter().println(rows);
    }
}